public class Test2 {
    public static void func1(Animal animal){
        animal.eat();
    }
    public static void func2(IRun run){
        run.Run();
    }
    public static void func3(IFly fly){
        fly.fly();
    }
    public static void main(String[] args) {
        Dog dog=new Dog("ee",18);
        Bird bird=new Bird("eee",12);
        func1(dog);
        func2(dog);
        System.out.println("=======");
        func1(bird);
        func3(bird);
    }
}
